import request from '@/utils/request'
const GET = 'GET';
const POST = 'POST';

const ACTION = "/pyArticleAction";
const UPDATE = ACTION+"/action";
const LIST = ACTION+"/list/";


/**
 * 更新用户操作文章
 * @param {操作点赞或收藏传输的布尔值} data 
 */
export function updateAction(data) {
    return request({
        url: UPDATE,
        method: POST,
        data
    }) 
}

/**
 * 通过用户id获取用户的操作列表
 * @param {用户id：userId} query 
 */
export function getUserOperaList(query) {
    return request({
        url: LIST+query,
        method: GET
    })
}